#!usr/bin/node

const Koa = require('koa'),
      Router = require('koa-router'),
      bodyparser = require('koa-bodyparser'),
      routerLoader = require('require-directory');

const app = new Koa(),
      router = new Router();

app.use(bodyparser({enableTypes:['json','form','text']}));

routerLoader(module,'./routes',{visit: r => app.use(r.routes())});

app.listen(8080);
